package com.caiyi.financial.nirvana.sms.util;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 常量类
 */
public class Constant extends Thread {

    /**
     * 环境常量
     */
    public final static String ENV_PRO = "pro";
    public final static String PRO_SEND_URL = "http://api.huaruilie.com/sms/api/send/message";
    public final static String DEV_SEND_URL = "http://39.100.85.203:8080/sms/api/send/message";

    public final static Long LOGIN_NUM = 10L;//每分钟允许登录10次

    /**
     * customer系统常量
     */
    //登录用户session
    public final static String SESSION_CUSTOMER_USER = "session:customer:user";
    //注册验证码SESSION
    public final static String SESSION_CUSTOMER_CODE = "session:customer:code";
    //接口文档地址
    public final static String CUSTOMER_DOC_URL = "https://www.showdoc.cc/zhankui";
    //联系QQ
    public final static String CUSTOMER_QQ = "1025526821";


    /**
     * 统一编码
     */
    public final static String CHARSET_UTF8 = "UTF-8";

    /**
     * 一天的秒数
     */
    public final static int DAY_OF_SECOND = 1 * 24 * 3600;

    /**
     * 10分钟的秒数
     */
    public final static int TEN_MINUTES_OF_SECOND = 1 * 10 * 60;

    /**
     * 客户余额不足提醒模板
     */
    public final static String SMS_REMIND_CONTENT = "尊敬的客户[%s]您好！您的当前余额为%s元，已不足%s元，请及时充值。";

    /**
     * 短信发送成功率
     */
    public final static double SUCCESS_RATE = 80;

    /**
     * 短信成功率预警模板
     */
    public final static String SMS_SUCCESS_RATE_CONTENT = "验证码通道[%s]短信成功率为%s,低于%s,请及时查看。";

    /**
     * 短信失败率预警模板
     */
    public final static String SMS_FAILED_RATE_CONTENT = "验证码通道[%s]短信失败率为%s,高于%s,请及时查看。";

    /**
     * 短信通道余额预警模板
     */
    public final static String SMS_BALANCE_CONTENT = "验证码通道[%s]余额剩余%s条,已不足%s条,请及时充值。(注:查询异常也会引起此警报,请务必人工确认.)";

    /**
     * 报警短信电话号码
     */
    public final static String PHONE = "18117351521";

    /**
     * 登陆验证码模板
     */
    public final static String SMS_LOGIN_CONTENT = "您的登录验证码为:%s";

    /**
     * 注册验证码模板
     */
    public final static String SMS_LOGIN_REGISTER_CONTENT = "您的注册验证码为:%s";

    /**
     * 验证码免审
     */
    public final static String CODE_FREE = "验证码,注册码,授权码,激活码,效验码,认证码,随机码,校验码,登录密码";

    public static final AtomicInteger seqNo = new AtomicInteger(0);

}
